package jsyf.oa.entity.device;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by 92852 on 2018/7/10.
 */
@Entity
@Table(name = "T_DVC_TRANSPORT", schema = "oa", catalog = "")
public class DeviceTransportEntity extends BaseEntity {
    private String deviceId = "";//该运输信息对应的设备的ID
    private String departure = "";
    private String departureContactName = "";
    private String departureContactTel = "";
    private String destination = "";
    private String destinationContactName = "";
    private String destinationContactTel = "";
    private String transportCompany = "";
    private String traComContactName = "";
    private String traComContactTel = "";
    private String modelCarLicense = "";
    private String driverName = "";
    private String driverTel = "";
    private String freight = "";
    private String deduction = "";
    private String deductionInstructions = "";
    private String modelCarPhotoName = "";
    private String modelCarPhotoUrl = "";
    private String driverCertificateName = "";
    private String driverCertificateUrl = "";
    private String devicePhotoName = "";
    private String devicePhotoUrl = "";
    private Integer state=0;

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public String getDeparture() {
        return departure;
    }

    public void setDeparture(String departure) {
        this.departure = departure;
    }

    public String getDepartureContactName() {
        return departureContactName;
    }

    public void setDepartureContactName(String departureContactName) {
        this.departureContactName = departureContactName;
    }

    public String getDepartureContactTel() {
        return departureContactTel;
    }

    public void setDepartureContactTel(String departureContactTel) {
        this.departureContactTel = departureContactTel;
    }

    public String getDestination() {
        return destination;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    public String getDestinationContactName() {
        return destinationContactName;
    }

    public void setDestinationContactName(String destinationContactName) {
        this.destinationContactName = destinationContactName;
    }

    public String getDestinationContactTel() {
        return destinationContactTel;
    }

    public void setDestinationContactTel(String destinationContactTel) {
        this.destinationContactTel = destinationContactTel;
    }

    public String getTransportCompany() {
        return transportCompany;
    }

    public void setTransportCompany(String transportCompany) {
        this.transportCompany = transportCompany;
    }

    public String getTraComContactName() {
        return traComContactName;
    }

    public void setTraComContactName(String traComContactName) {
        this.traComContactName = traComContactName;
    }

    public String getTraComContactTel() {
        return traComContactTel;
    }

    public void setTraComContactTel(String traComContactTel) {
        this.traComContactTel = traComContactTel;
    }

    public String getModelCarLicense() {
        return modelCarLicense;
    }

    public void setModelCarLicense(String modelCarLicense) {
        this.modelCarLicense = modelCarLicense;
    }

    public String getDriverName() {
        return driverName;
    }

    public void setDriverName(String driverName) {
        this.driverName = driverName;
    }

    public String getDriverTel() {
        return driverTel;
    }

    public void setDriverTel(String driverTel) {
        this.driverTel = driverTel;
    }

    public String getFreight() {
        return freight;
    }

    public void setFreight(String freight) {
        this.freight = freight;
    }

    public String getDeduction() {
        return deduction;
    }

    public void setDeduction(String deduction) {
        this.deduction = deduction;
    }

    public String getDeductionInstructions() {
        return deductionInstructions;
    }

    public void setDeductionInstructions(String deductionInstructions) {
        this.deductionInstructions = deductionInstructions;
    }

    public String getModelCarPhotoName() {
        return modelCarPhotoName;
    }

    public void setModelCarPhotoName(String modelCarPhotoName) {
        this.modelCarPhotoName = modelCarPhotoName;
    }

    public String getModelCarPhotoUrl() {
        return modelCarPhotoUrl;
    }

    public void setModelCarPhotoUrl(String modelCarPhotoUrl) {
        this.modelCarPhotoUrl = modelCarPhotoUrl;
    }

    public String getDriverCertificateName() {
        return driverCertificateName;
    }

    public void setDriverCertificateName(String driverCertificateName) {
        this.driverCertificateName = driverCertificateName;
    }

    public String getDriverCertificateUrl() {
        return driverCertificateUrl;
    }

    public void setDriverCertificateUrl(String driverCertificateUrl) {
        this.driverCertificateUrl = driverCertificateUrl;
    }

    public String getDevicePhotoName() {
        return devicePhotoName;
    }

    public void setDevicePhotoName(String devicePhotoName) {
        this.devicePhotoName = devicePhotoName;
    }

    public String getDevicePhotoUrl() {
        return devicePhotoUrl;
    }

    public void setDevicePhotoUrl(String devicePhotoUrl) {
        this.devicePhotoUrl = devicePhotoUrl;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj=new JSONObject();
        obj.put("ID",this.getId());
        obj.put("CREATE_TIME",this.getCreateTime());
        obj.put("UPDATE_TIME",this.getUpdateTime());
        obj.put("DEVICE_ID",this.getDeviceId());
        obj.put("DEPARTURE",this.getDeparture());
        obj.put("DEPARTURE_CONTACT_NAME",this.getDepartureContactName());
        obj.put("DEPARTURE_CONTACT_TEL",this.getDepartureContactTel());
        obj.put("DESTINATION",this.getDestination());
        obj.put("DESTINATION_CONTACT_NAME",this.getDestinationContactName());
        obj.put("DESTINATION_CONTACT_TEL",this.getDestinationContactTel());
        obj.put("TRANSPORT_COMPANY",this.getTransportCompany());
        obj.put("TRA_COM_CONTACT_NAME",this.getTraComContactName());
        obj.put("TRA_COM_CONTACT_TEL",this.getTraComContactTel());
        obj.put("MODEL_CAR_LICENSE",this.getModelCarLicense());
        obj.put("DRIVER_NAME",this.getDriverName());
        obj.put("DRIVER_TEL",this.getDriverTel());
        obj.put("FREIGHT",this.getFreight());
        obj.put("DEDUCTION",this.getDeduction());
        obj.put("DEDUCTION_INSTRUCTIONS",this.getDeductionInstructions());
        obj.put("MODEL_CAR_PHOTO_NAME",this.getModelCarPhotoName());
        obj.put("MODEL_CAR_PHOTO_URL",this.getModelCarPhotoUrl());
        obj.put("DRIVER_CERTIFICATE_NAME",this.getDriverCertificateName());
        obj.put("DRIVER_CERTIFICATE_URL",this.getDriverCertificateUrl());
        obj.put("DEVICE_PHOTO_NAME",this.getDevicePhotoName());
        obj.put("DEVICE_PHOTO_URL",this.getDevicePhotoUrl());
        obj.put("STATE",this.getState());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_DVC_TRANSPORT";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("DEVICE_ID","deviceId");
        obj.put("DEPARTURE","departure");
        obj.put("DEPARTURE_CONTACT_NAME","departureContactName");
        obj.put("DEPARTURE_CONTACT_TEL","departureContactTel");
        obj.put("DESTINATION","destination");
        obj.put("DESTINATION_CONTACT_NAME","destinationContactName");
        obj.put("DESTINATION_CONTACT_TEL","destinationContactTel");
        obj.put("TRANSPORT_COMPANY","transportCompany");
        obj.put("TRA_COM_CONTACT_NAME","traComContactName");
        obj.put("TRA_COM_CONTACT_TEL","traComContactTel");
        obj.put("MODEL_CAR_LICENSE","modelCarLicense");
        obj.put("DRIVER_NAME","driverName");
        obj.put("DRIVER_TEL","driverTel");
        obj.put("FREIGHT","freight");
        obj.put("DEDUCTION","deduction");
        obj.put("DEDUCTION_INSTRUCTIONS","deductionInstructions");
        obj.put("MODEL_CAR_PHOTO_NAME","modelCarPhotoName");
        obj.put("MODEL_CAR_PHOTO_URL","modelCarPhotoUrl");
        obj.put("DRIVER_CERTIFICATE_NAME","driverCertificateName");
        obj.put("DRIVER_CERTIFICATE_URL","driverCertificateUrl");
        obj.put("DEVICE_PHOTO_NAME","devicePhotoName");
        obj.put("DEVICE_PHOTO_URL","devicePhotoUrl");
        obj.put("STATE","state");
        return obj;
    }

}
